import { getLocale } from 'umi'
import langenus from '@/locales/en-US.js'
import langzhcn from '@/locales/zh-CN.js'
import langzhhk from '@/locales/zh-HK.js'

const langs = {
  'en-US': langenus,
  'zh-CN': langzhcn,
  'zh-HK': langzhhk,
}
function langfn () {
  const locale = getLocale()
  return langs[locale]
}
export const leadStagefn = () => {
  const lang = langfn()
  return [
    {
      label: lang.leadstage_1,
      value: '1'
    },
    {
      label: lang.leadstage_2,
      value: '2'
    },
    {
      label: lang.leadstage_3,
      value: '3'
    },
    {
      label: lang.leadstage_4,
      value: '4'
    },
    {
      label: lang.leadstage_5,
      value: '5'
    },
    {
      label: lang.leadstage_6,
      value: '6'
    },
    {
      label: lang.leadstage_7,
      value: '7'
    },
]}

export  const leadSourcefn = () => {
  const lang = langfn()
  return [
    {
      label: lang.leadsource_1,
      value: '1'
    },
    {
      label: lang.leadsource_2,
      value: '2'
    },
    {
      label: lang.leadsource_3,
      value: '3'
    },
    {
      label: lang.leadsource_4,
      value: '4'
    },
    {
      label: lang.leadsource_5,
      value: '5'
    },
    {
      label: lang.leadsource_6,
      value: '6'
    },
    {
      label: lang.leadsource_7,
      value: '7'
    },
    {
      label: lang.leadsource_8,
      value: '8'
    },
    {
      label: lang.leadsource_9,
      value: '9'
    },
    {
      label: lang.leadsource_10,
      value: '10'
    },
  ]
}

export const sourcesfn = () => {
  const lang = langfn()
  return [
    {
      label: lang.sources_1,
      value: 1,
    },
    {
      label: lang.sources_2,
      value: 2,
    },
    {
      label: 'Facebook',
      value: 3,
    },
    {
      label: 'Instagram',
      value: 4,
    },
    {
      label: 'LinkedIn',
      value: 5,
    },
    {
      label: lang.email,
      value: 6,
    },
    {
      label: lang.sources_7,
      value: 7,
    },
    {
      label: lang.sources_8,
      value: 8,
    },
  ];
}

export const priorityfn = () => {
  const lang = langfn()
  return [
    {
      label: lang.priority_1,
      value: '1'
    },
    {
      label: lang.priority_2,
      value: '2'
    },
    {
      label: lang.priority_3,
      value: '3'
    },
  ]
}

export const rolefn = () => {
  const lang = langfn()
  return [
    {
      label: lang.role_1,
      value: 'Admin'
    },
    {
      label: lang.role_2,
      value: 'Team Admin'
    },
    {
      label: lang.role_3,
      value: 'Staff'
    },
  ]
}


